package com.course.android.activity.ac;

import android.content.Intent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.baselib.android.utils.ToastTool;
import com.baselib.android.utils.img.ImageLoader;
import com.course.android.R;
import com.course.android.activity.base.BaseActivity;

import org.apache.commons.lang.StringUtils;

public class ViewActivity  extends BaseActivity {

    EditText et;
    TextView tv;
    ImageView iv;
    @Override
    protected void initView() {
        findViewById(R.id.bt).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String etStr = et.getText().toString();
                if (StringUtils.isNotBlank(etStr)){
                    tv.setText(etStr);
                    ToastTool.show(ViewActivity.this,"复制成功");
                }
                ImageLoader.getInstance(ViewActivity.this).displayAvatar("https://thirdwx.qlogo.cn/mmopen/vi_32/oKTuE5yuYyTsFeHIvYDVwxsfPHibM5xjdw8ia1leVapBNRnCVebEGq6ITpWmyHIx6sxic4JvyvNBToXuQDXW93Teg/132",iv);
            }
        });
        et = findViewById(R.id.et);
        tv = findViewById(R.id.tv);
        iv = findViewById(R.id.iv);

    }

    @Override
    protected void initData() {

    }

    @Override
    protected int bindLayout() {
        return R.layout.activity_view;
    }

    @Override
    protected void onActivityResultCallBack(Integer reqCode, Intent data) {

    }
}
